﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace VehicleTest
{
    public partial class VehicleDetectionZoom : Form
    {
        private VehicleDetection detection;

        public VehicleDetectionZoom(VehicleDetection vd)
        {
            InitializeComponent();
            detection = vd;
        }

        protected override void OnFormClosing(FormClosingEventArgs e)
        {
            e.Cancel = true;   //此时单击关闭按钮后并不释放资源,此窗口的资源在VehicleDetection窗口中释放
            detection.toolStripButton_ZoomOut.Text = "放大显示";
            detection.zoom_open = false;
            this.Hide();

            base.OnFormClosing(e);   //在MSDN中规定如果重载了OnFormClosing函数，最后要调用基类的OnFormClosing函数
        }
    }
}
